package com.taxi;

import java.net.URL;

import org.apache.pivot.beans.Bindable;
import org.apache.pivot.collections.Map;
import org.apache.pivot.util.Resources;
import org.apache.pivot.wtk.BoxPane;

import com.taxi.model.Driver;
import com.taxi.service.TaxiService;

public class NewDriverController extends BoxPane implements Bindable{
    
    private TaxiService taxiService;

    @Override
    public void initialize(Map<String, Object> namespace, URL location, Resources resources) {
        System.out.println(namespace);
    }
    
    public void saveNewDriver(){
        try {
            taxiService.saveDriver(new Driver());
        } catch (Exception e) {
e.printStackTrace();
        }
    }


    /**
     * @param taxiService the taxiService to set
     */
    public void setTaxiService(TaxiService taxiService) {
        this.taxiService = taxiService;
    }

}
